package day06;
import java.util.Arrays;
public class 标准1 {
   /*public static void main(String[] args) {
        int[] arr=new int[10];
        for(int i=0;i<arr.length;i++){
            arr[i] =(int)(Math.random()*100);
            System.out.println(arr[i]);
        }
        int max =arr[0];
        for(int i=1;i<arr.length;i++){
            if(arr[i]<max){
                max =arr[i];
            }
        }
        System.out.println("最大值为："+max);

        arr =Arrays.copyOf(arr,arr.length+1);
        arr[arr.length-1]=max;
        for(int i=0;i<arr.length;i++) {
            System.out.println(arr[i]);

        }
    }*/
    //2)
  /* public static void main(String[] args) {
       say();
       sayHi("高启强");
       sayHollo("高启强",26);
   }
    public static void say(){
        System.out.println("大家好，我叫高启强，今年应该是噶了");
    }
    public static void sayHi(String name){
        System.out.println("大家好,我叫"+name+"，今年应该是噶了");
    }
    public static void sayHollo(String name,int age){
       if(age>=60){
           return;
       }
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");
    }*/
//3)
    public static void main(String[] args) {
        double a=getNum();
        System.out.println(a);

        int b=plus(5,6);
        System.out.println(b);
        int m=5,n=6;
        int c=plus(m,n);
        System.out.println(c);

        int[]d=testarray(5,100);
        System.out.println("数组长度为："+d.length);
       for(int i=0;i<d.length;i++) {


           System.out.println(d[i]);
       }
       int[]e=testarray(8,20);
        System.out.println("第1个元素的值为："+e[0]);
        for (int i=1;i<e.length;i++){

        }
    }
    public static double getNum(){
        return 8.96;
    }
    public static int plus(int num1,int num2){
        int num=num1+num2;
        return num;
    }
    public static int[]testarray(int len,int max){
        int[]arr=new int[len];
        for(int i=0;i<arr.length;i++){
            arr[i]=(int) (Math.random()*100);
        }
        return arr;
    }

}
